package com.hedonihilist.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;





@SpringBootApplication
public class ExampleApplication {

	/*
		第二种配置方式
		定义Bean的时候指明前缀
	 */
    @Bean
	@ConfigurationProperties(prefix = "config2")
	public MyConfig2 getConfig2() {
    	return new MyConfig2();
	}

	public static void main(String[] args) {
		SpringApplication.run(ExampleApplication.class, args);
	}

}
